package com.homework5;

public class Test {
    public static void show(Animal a){
        a.eat();
    }

    public static void main(String[] args) {
        Animal a=new Dog();
         show(a);
         a=new Cat();
        show(a);
       /* if (a instanceof Cat){
            Cat cat=(Cat)a;
        }else if (a instanceof Dog){
            Dog dog=(Dog)a;
        }*/
        Cat cat=(Cat)a;
        cat.climTree();



    }
}
